import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            component: resolve => require(["@/components/Main.vue"], resolve)
        },
        {
            path: "/login",
            component: resolve => require(["@/components/Login.vue"], resolve)
        },
        {
            path: "/main",
            component: resolve => require(["@/components/Main.vue"], resolve)
        },
        {
            path: "/cash",
            component: resolve => require(["@/components/Cash.vue"], resolve)
        },
        {
            path: "/payments",
            component: resolve => require(["@/components/Payment.vue"], resolve)
        },
        {
            path: "/orders/:id",
            component: resolve => require(["@/components/DetailOrder.vue"], resolve)
        },
        { path: "/owner", component: resolve => require(["@/components/Owner.vue"], resolve) },
        { path: "/common_set",component: resolve => require(["@/components/CommonSet.vue"], resolve)},
        { path: "/depoist",component: resolve => require(["@/components/Depoist.vue"], resolve)},
        { path: "/events",component: resolve => require(["@/components/OrderEvent.vue"], resolve)},
        { path: "/msg",component: resolve => require(["@/components/Message.vue"], resolve)},
        { path: "/appoint",component: resolve => require(["@/components/OrderForm.vue"], resolve)},
        { path: "/upload",component: resolve => require(["@/components/Upload.vue"], resolve)},
        { path: "/notify",component: resolve => require(["@/components/Notify.vue"], resolve)},
        { path: "/notify/:id", name: "notify", component: resolve => require(["@/components/NotifyDetail.vue"], resolve)},
        { path: "/group-chats", name: "group", component: resolve => require(["@/components/Group.vue"], resolve)},
        { path: "/chat/:id", name: "chat", component: resolve => require(["@/components/Chat.vue"], resolve)},
    ]
})
